<?php
$path = $_GET['path'];
$fname	= "/data01/files/". $path;
$fp	= fopen($fname, "rb");
// send the right headers
header("Content-Type: image/jpeg");
header("Content-Length: " . filesize($fname));
fpassthru($fp);
exit;
?>